<? include_once("../../../common/common_setting_unit.php"); //引入通用的设置文件?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php include_once('../../../modules/head.php'); ?>
    <? include_once(ROOT_PATH_ . "/controller/common/module/head.php"); ?>
    <? include_once("../controller/data_list.php"); ?>
</head>

<body>



<div id="topbar">
<?php include  '../../../modules/topbar.php'; ?>
</div>

<div id="container" class="<? echo $now_extender ?>">



<div id="maincontent">


        <div id="sidebar">
            <?php include '../../../modules/sidebar.php'; ?>
        </div>



        <div id="content">

            <!--标题设定-->
            <?php $page_title='客户留言';?>
            <?php include ROOT_PATH_ . '/controller/common/module/mod-page-title.php'; ?>

            <!--搜索框-->
            <?php include 'module/mod-search.php'; ?>


            <!--功能按钮：新增，统计，全选，排序，导出之类的-->
            <?php //include 'module/mod-function.php'; ?>



<?
//==============================================================================
//这里开始才是平常开发需要注重的部分，其余的基本不用理会
//==============================================================================
?>


            <!-- 用$now_extender .list_boxe来控制来到确认板块信息显示-->
            <div class="list-box">
                    <table class="layui-table">
                        <colgroup>
                            <col width="80" >
                            <col width="100" >
                            <col   >
                            <col   >
                            <col width="280" >
                            <col width="180" >
                            <col width="80" >
                            <col width="180" >
                        </colgroup>
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th>姓名</th>
                            <th>内容</th>
                            <th>电话</th>
                            <th>邮箱</th>
                            <th>留言时间</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>


                        <?php for ($i = 0; $i < $_quantity_per_page; $i++) {?>

                            <tr id="item<? echo $data['data_list'][$i]['nid'] ?>">

                                <td><? echo $i + 1 + $plate['page_list_num'] * ($nowpageid - 1) ?></td>
                                <td><span class="els1"><? echo $data['data_list'][$i]['name'] ?></span> </td>
                                <td><span class="els2"> <? echo $data['data_list'][$i]['content'] ?><? echo $data['data_list'][$i]['introduce'] ?></span></td>
                                <td><span class="els1"> <? echo $data['data_list'][$i]['phone'] ?></span></td>
                                <td><span class="els1"> <? echo $data['data_list'][$i]['email'] ?></span></td>
                                <td><? echo $data['data_list'][$i]['inputtime'] ?></td>

                                <td id="read_status_<?echo $data['data_list'][$i]['nid']?>"><? if($data['data_list'][$i]['status'] !='已读'){echo "<span class='layui-badge'>未读</span>";}else{echo $data['data_list'][$i]['status'];} ?></td>

                                <td>


                                    <a href="data_edit.php?now_extender=guestbook&nid=<? echo $data['data_list'][$i]['nid'] ?>&nowpageid=<? echo $_REQUEST['nowpageid'] ?>&sys_part=guestbook"
                                       class="layui-btn  layui-btn-sm " target="_blank"
                                       onclick="make_status_read('read_status_<?echo $data['data_list'][$i]['nid']?>')">
                                        <i class="fa fa-bar-chart-o" aria-hidden="true"></i>信息
                                    </a>



                                    <span
                                            onclick="deleter(<?php echo $data['data_list'][$i]['nid'] ?>,'data_delete')"
                                            class="layui-btn layui-btn-sm layui-btn-primary">
                                        <i class="layui-icon">&#xe640;</i>删除
                                    </span>
                                </td>

                                
                            </tr>
                        <?php;} ?>



                        </tbody>
                    </table>


<?
//==============================================================================
//这里上面才是平常开发需要注重的部分，下面的基本不用理会，只有底部JS部分需要根据实际情况去加载
//==============================================================================
?>


                    <?php //无数据时显示
                    if (count($data['data_list']) == 0) { echo "暂无数据"; }
                    ?>



                    <!-- todo 这里需要做0判断-->
                    <?php include 'module/page_numbers.php'; ?>


            </div>
            <!--list-box end-->


        </div>
        <!--content端點01-->



</div>
<!--maincontent-->
<br class="clearfloat"/>
</div>
<!--container-->
</div>




<!--引入模块js文件，js里面的make_status_read-->
<script src="../asset/js/make_status_read.js"></script>

<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?>
</body>
</html>
